package com.zqu.service.impl;

import com.zqu.mapper.ReimbursementMapper;
import com.zqu.pojo.Reimbursement;
import com.zqu.service.ReimbursementService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ReimbursementServiceImpl implements ReimbursementService {
    @Resource
    private ReimbursementMapper reimbursementMapper;
    @Override
    public Reimbursement findServe(long id) {
        return reimbursementMapper.selectTById(id);
    }

    @Override
    public List<Reimbursement> selectList(Reimbursement reimbursement) {
        return reimbursementMapper.selectList(reimbursement);
    }

    @Override
    public boolean insertT(Reimbursement reimbursement) {
        int flag = reimbursementMapper.insertT(reimbursement);
        if(flag>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean updateT(Reimbursement reimbursement) {
        int flag = reimbursementMapper.updateT(reimbursement);
        if(flag>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean deleteT(long id) {
        int flag = reimbursementMapper.deleteT(id);
        if(flag>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean deleteTByIds(String[] ids) {
        int flag = reimbursementMapper.deleteTByIds(ids);
        if(flag>0){
            return true;
        }
        return false;
    }
}
